/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-11-11 12:55:58
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-21 11:51:23
 */
import request from '@/utils/request'
import {SysRoleDomain} from '@/type.d/system/role';


export function RoleIndex(query: SysRoleDomain) {
  return request('/system/role/index',{
    method: 'get',
    params: query
  })
}

// 查询角色信息列表
export function listRole(query: SysRoleDomain) {
  return request('/system/role/list',{
    method: 'get',
    params: query
  })
}

// 查询角色信息详细
export function getRole(roleId: string) {
  return request({
    url: '/system/role/' + roleId,
    method: 'get'
  })
}

// 新增角色信息
export function addRole(data: SysRoleDomain) {
  return request('/system/role',{
    method: 'post',
    data: data
  })
}

// 修改角色信息
export function updateRole(data: SysRoleDomain) {
  return request('/system/role',{
    method: 'put',
    data: data
  })
}

// 删除角色信息
export function delRole(roleId: string) {
  return request({
    url: '/system/role/' + roleId,
    method: 'delete'
  })
}
